package think.in.java.concurrency.practise.exec3;

import java.util.concurrent.Callable;

/**
 * Created by IntelliJ IDEA.
 * User: Richard
 * Date: 5/19/11
 * Time: 12:17 AM
 * To change this template use File | Settings | File Templates.
 */
public class ForFuture implements Callable<Integer>{
    static private int count=0;
    public ForFuture(){
       count++;
    }
    public Integer call() throws Exception {
        Thread.sleep(1000);
        System.out.println("call at " + count + "thread: " + Thread.currentThread().toString());
        return count;  //To change body of implemented methods use File | Settings | File Templates.
    }
}
